import Vue from 'vue'
import App from './App'
import store from './store'
import router from './router'
import Cookies from 'js-cookie'

/* 全局混合*/
import globolMixins from '@/mixins/globolMixins'
Vue.mixin(globolMixins)

import 'normalize.css/normalize.css' // a modern alternative to CSS resets
import './utils/error-log' // error log

/* 引入element ui*/
import Element from 'element-ui'
import './styles/element-variables.scss'
Vue.use(Element, { size: Cookies.get('size') || 'mini' })

// 引入自定义样式
import '@/styles/index.scss' // global css
import '@/styles/kh-customer.scss' // global css
// svg icon
import './icons'
// 引入自定义Icon组件
import '@/components/IconUse'
// 富文本编辑器
import '@/components/TinymceKH'
// permission control
import './permission'
// error log
import './utils/error-log'
import '@/styles/elemenetStyleOverFlow.scss'
// global filters
import * as filters from './filters'
// 时间控件moment-mini
import momentMini from 'moment-mini'
Vue.prototype.$momentMini = momentMini

// 通用工具类comentUtil
import comentUtil from '@/utils/comentUtil'
Vue.prototype.$comentUtil = comentUtil
// 连接处理工具qs
// import qs from 'qs'
// Vue.prototype.$qs = qs
// http公用请求方法
import axiosReq from '@/utils/httpAxios'
Vue.prototype.$axiosReq = axiosReq
// register global utility filters
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

// 如果需要i-view框架可在此处引入
// 1.安装包  cnpm install  -S "view-design": "^4.1.1"
// 2.引入
// import 'view-design/dist/styles/iview.css'
// import viewDesign from 'view-design';
// Vue.use(viewDesign);

// 引入主题色
// import '@/assets/theme/two/index.scss'
// import '@/assets/theme/blue/index.scss'

// 事件总线
Vue.prototype.$bus = new Vue()
// Vue.prototype.$create = create

// 去除生产提示
Vue.config.productionTip = false
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
